package de.ventu.model
{
	import com.memamsa.airdb.DB;
	import com.memamsa.airdb.Migrator;
	import com.memamsa.airdb.Modeler;

	[Association(name="image", className="de.ventu.model.Image", type="belongs_to")]

	dynamic public class Tag extends Modeler
    {
    	private static const migrations:Migrator = new Migrator(
	      Tag,
	      {id: true},
	      [
	        function(my:Migrator):void {
	          my.createTable(function():void {
	            my.column('tagValue', DB.Field.VarChar, {limit: 128});
	            my.column('tagIsFolder', DB.Field.Integer, {limit: 1});
	            my.column('tagHierarchyName', DB.Field.VarChar, {limit: 128});
	            my.column('tagHierarchyLevel', DB.Field.Integer);
	            my.columnTimestamps();
	          });
	        }
	      ]);
    }
}